<?php                    
require_once('../../../../init.php');   

LogPay::log_file("浏览器回调地址:\r\n".print_pre($_POST));    
$url_base=UtilNet::urlbase();
/**
 * 浏览器回调地址 
 */
if (Payment_Sheng::current()->returnSign())
{
    /*支付成功*/
    $oid=$_POST['OrderNo'];
    $fee=$_POST['TransAmount'];
    /*商家自行检测商家订单状态，避免重复处理，而且请检查fee的值与订单需支付金额是否相同*/
    $order=Order::get_one("order_no=".$oid);
    if ($order){
        $order_fee=sprintf("%01.2f",is_numeric($order->final_amount)?$order->final_amount:0);
        if ($order_fee==$fee){
            header("location:".$url_base."index.php?go=jiabo.info.view&order_id=".$order_id."&type=".EnumViewInfoType::PAYOVER);  
        }else{
            header("location:".$url_base."index.php?go=jiabo.info.view");  
        }
    }
}else{
    header("location:".$url_base."index.php?go=jiabo.info.view");      
}
?>